<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>博客详情页</title>

    <div th:include="commen :: #common_link"></div>

</head>

<body>
<div th:include="admin/admin_commen :: #common_nav"></div>
<!-- Page Header -->
<header class="masthead" style="background-image: url('/images/pen.jpg')">
    <div class="overlay"></div>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-10 mx-auto">
                <div class="page-heading">
                    <h1 class="text-nowrap" th:text="${blog.getTitle()}">博客标题</h1>
                    <span class="subheading" th:text="${blog.getSubtitle()}">博客简介</span>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Main Content -->
<div class="container">
    <div class="row">
        <div class="col-lg-8 col-md-10 mx-auto">
            <div>
                作者 : <a href="#" class="text-primary"
                        th:text="${userService.queryById(blog.getUser_id()).getName()}"></a><br>
                Tags : <span th:text="${tagInfo}"></span><br>
                <div class="text-muted">
                    发布日期 ：<span th:text="${blog.getPublic_time()}"></span>
                </div>
            </div>
            <p>博客正文:</p>
            <p th:each="content:${contents}" th:text="${content}"></p>
            <h3>评论区</h3>
            <hr>
            <div th:each="cmt:${comments}">
                <p th:text="${cmt.getContent()}"></p>
                <p class="post-meta" align="right">由 [[${userService.queryById(cmt.getUser_id()).getName()}]]
                    发表于 [[${cmt.getPublic_time()}]]</p>
                <hr>
            </div>
            <hr>
            <div class="clearfix">
                <a class="btn btn-primary float-right" th:href="@{delete(id=${blog.getNid()})}">删除博客&rarr;</a>
            </div>
        </div>
    </div>
</div>


<div th:include="commen :: #common_footer"></div>

</body>
</html>
